package com.kandinfo.base.admin.service;

import java.util.List;

import org.quartz.SchedulerException;

import com.kandinfo.base.admin.domain.ScheduleJob;
import com.kandinfo.base.admin.dto.ScheduleJobDto;
import com.kandinfo.base.admin.dto.ScheduleJobSearchDto;
import com.kandinfo.base.admin.repository.ScheduleJobJPARepository;
import com.kandinfo.base.common.dto.ResultDto;
import com.kandinfo.base.common.dto.widget.DataTablesResponseDto;
import com.kandinfo.base.common.service.Service;

public interface ScheduleJobService extends Service<ScheduleJob, Long, ScheduleJobJPARepository>{

    void deleteByPrimaryKey(List<Long> jobIds);

    void insert(ScheduleJob record);

    int insertSelective(ScheduleJob record);

    ScheduleJob selectByPrimaryKey(Long jobId);

    void updateByPrimaryKeySelective(ScheduleJob record);

    Integer updateByPrimaryKey(ScheduleJob record);
    public Integer addTask(ScheduleJob job);
    
    public void changeStatus(Long jobId, String cmd) throws SchedulerException;

    DataTablesResponseDto<ScheduleJobDto> getSearchByCon(ScheduleJobSearchDto searchDto);
    public void addJob(ScheduleJob job) throws SchedulerException;
    public void pauseJob(Long jobId) throws SchedulerException;
    public void resumeJob(Long jobId) throws SchedulerException;
    public void runAJobNow(Long jobId) throws SchedulerException;
    public void updateJobCron(ScheduleJob scheduleJob) throws SchedulerException;
    
    ScheduleJob IsThere(ScheduleJob s);
    
    ResultDto deleteOne(Long id);
    
    public ResultDto delete(String ids);
    
    void InitJob() throws SchedulerException;

	void deleteJob(ScheduleJob scheduleJob) throws SchedulerException;
}
